<template>
	<view>
		<u-navbar :title="$t('my.set.title')"  :autoBack="true" placeholder></u-navbar>
		<view class="content">
			<view class="box">
				<!-- <view class="item" @click="goAddress">
					<u--text :text="$t('my.set.address')" color="#141414" size="15" ></u--text>
					<u-icon name="arrow-right" color="#D2D5D7"></u-icon>
				</view> -->
				<view class="item" @click="goPath">
					<u--text :text="$t('my.set.notice')" color="#141414" size="15" ></u--text>
					<u-icon name="arrow-right" color="#D2D5D7"></u-icon>
				</view>
			</view>
			<view class="btn">
				<!-- <u-button text="绑定" shape="circle" :customStyle="btn1Style"></u-button> -->
				<u-button @click="setOut" :text="$t('my.set.btnText')" shape="circle" :customStyle="btn2Style"></u-button>
			</view>
		</view>
		<u-toast ref="uToast"></u-toast>
	</view>

</template>

<script>
	import {
		mapActions
	} from 'vuex'
	export default {
		data() {
			return {
				btn1Style:{
					background:"#FFC100",
					color:"#000",
					border:"none",
					height:"88rpx",
					width:"80%",
					margin:"20px auto"
				},
				btn2Style:{
					background:"#f6efd5",
					color:"#000",
					border:"1px solid #FFBF00",
					height:"88rpx",
					width:"80%",
					margin:"20px auto"
				}
			};
		},
		methods:{
			...mapActions(['logout']),
			setOut(){
				this.logout()
				this.$refs.uToast.show({
					type: 'default',
					message: "退出成功",
					duration: 1000,
					complete() {
						uni.navigateBack()
					}
				})
			},
			goPath(){
				uni.$u.route('/pagesA/my/privacy')
			}
		}
	}
</script>
<style>
	page{
		background-color: #f5f7f9;
	}
</style>
<style lang="scss" scoped>
.content{
	padding: 30rpx;
	.box{
		background-color: #fff;
		border-radius: 20rpx;
		padding: 0 40rpx;
		.item{
			padding: 40rpx 0;
			border-bottom: 2rpx solid #EEEEEE;
			display: flex;
			align-items: center;
			justify-content: space-between;
		}
		.item:last-child{
			border-bottom: none;
		}
	}
	.btn{
		position: fixed;
		left: 0;
		bottom: 15%;
		width: 100%;
	}
}
</style>
